import Axios from "axios";

export const download = url => {
    Axios.get(url, {
        responseType: 'blob',
        headers: {
            "Access-Control-Allow-Origin": "*"
        }
    }).then(res => {
        const blob = new Blob([res.data])
        let a = document.createElement('a')
        a.href = URL.createObjectURL(blob)
        a.download = res.filename
        a.click()
    })
}
